package com.catazy.mvvmlib.net.network

import com.kunminx.architecture.ui.callback.UnPeekLiveData

/**
 * 作者: Tao
 * 日期: 2024/1/24
 * 时间: 16:30
 * 描述: 网络状态管理类
 */
class NetworkStateManager {

    //当前网络状态的LiveData，其主要作用是以LiveData的方式来给各页面发送当前的网络状态
    val mNetworkStateCallback = UnPeekLiveData<NetState>()

    //双重校验锁式-单例
    companion object {
        val instance: NetworkStateManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            NetworkStateManager()
        }
    }


}